<route lang="json5" type="page">
{
  style: { navigationBarTitleText: '多数据视图' },
}
</route>

<template>
  <IBizView
    v-if="isComplete"
    :context="context"
    :params="params"
    :modelData="viewModel"
    :provider="provider"
  ></IBizView>
</template>

<script lang="ts" setup>
import { IViewProvider, getViewProvider } from "@ibiz-template/runtime";
import { IAppIndexView } from "@ibiz/model-core";

const viewModel = ref<IAppIndexView | undefined>();
const provider = ref<IViewProvider>();
const isComplete = ref(false);
const context = ibiz.appData?.context || {};
const params = {};

const initView = async () => {
  const viewConfig = await ibiz.hub.config.view.get('MobViewTestMobMDView_confirm');
  if (viewConfig) {
    viewModel.value = await ibiz.hub.getAppView(viewConfig.id);
    try {
      provider.value = await getViewProvider(viewModel.value);
    } catch (error) {
    } finally {
      isComplete.value = true;
    }
  }
};

initView()
</script>

<style lang="scss" scoped>
//
</style>
